
<ion-header>

  <ion-navbar color = "primary">
    <ion-title>景区</ion-title>
  </ion-navbar>
  <ion-toolbar>
    <ion-searchbar placeholder="搜索景区" (ionInput)="searchParks($event)"
     (ionClear)="resetParks($event)"></ion-searchbar>
  </ion-toolbar>
</ion-header>


<ion-content padding>
    <ion-refresher (ionRefresh)="doRefresh($event)">
        <ion-refresher-content
          pullingIcon="arrow-dropdown"
          pullingText="下拉刷新"
          refreshingSpinner="circles"
          refreshingText="数据刷新...">
        </ion-refresher-content>
      </ion-refresher>

<ion-list [virtualScroll]="parks" [approxItemHeight]="'200px'"> 
  <ion-item *virtualItem="let park" (click)="itemTapped(park)">
    <ion-thumbnail item-start>
      <ion-img [src]="park.img" cache=true></ion-img>
    </ion-thumbnail>
  <h2>{{park.name}}</h2>
  <p>{{park.level}}</p>

  </ion-item>
</ion-list>

<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
  <ion-infinite-scroll-content loadingText="加载数据..."></ion-infinite-scroll-content>
</ion-infinite-scroll>

</ion-content>
